package com.qingcloud.fexecutor.model;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

/**
 * <p>
 * API文档和SQL
 * </p>
 *
 * @author wangjinnan
 * @since 2021-05-10
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@Table(name = "df_api_doc")
public class ApiDoc implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /**
     * 所属API ID
     */
    private Integer apiId;

    /**
     * 数据源ID
     */
    private Integer dsId;

    /**
     * 动态API SQL
     */
    @Column(name = "`sql`")
    private String sql;

    /**
     * SQL中包含的表ID
     */
    private String tableIds;

    /**
     * API文档
     */
    private String doc;


}
